import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import orm.po.ListeningInfo;
import service.ListeningService;
import threadtask.MainTask;
import utils.MyDateUtils;

import java.text.ParseException;
import java.util.Date;
import java.util.List;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * @author yuyufeng
 * @date 2018/2/7
 */
public class Main {
    public static void main(String[] args) {
        ExecutorService executorService = Executors.newSingleThreadExecutor();
        String[] paths = {"spring/spring-dao.xml", "spring/spring-service.xml", "classpath:spring/spring-redis.xml"};
        ApplicationContext ctx = new ClassPathXmlApplicationContext(paths);
        ListeningService listeningService = ctx.getBean(ListeningService.class);
        executorService.execute(new MainTask(listeningService));
    }

}
